/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.designPatterns.creational.factoryMethod.factory;

import ac.za.designPatterns.creational.factoryMethod.Car;
import ac.za.designPatterns.creational.factoryMethod.model.ClassicCar;
import ac.za.designPatterns.creational.factoryMethod.model.MordenCar;

/**
 *
 * @author Sandiso Toto
 */
public class CarFactory {
    
    
    public Car getCar(String CarName){
    
       if("Cressida".equals(CarName)){
        return new ClassicCar();
       }else
           return new MordenCar();
       
        
    }
    
}
